package com.gongyinlian.personalprofilewebsiteserver.config;

import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Contact;
import io.swagger.v3.oas.models.info.Info;
import io.swagger.v3.oas.models.info.License;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Knife4j（Swagger）配置
 * 
 * @author personal-profile-website
 * @date 2024-10-27
 */
@Configuration
public class Knife4jConfig {
    
    @Bean
    public OpenAPI customOpenAPI() {
        return new OpenAPI()
                .info(new Info()
                        .title("个人作品集系统 API 文档")
                        .version("2.0.0")
                        .description("个人作品集系统后端 RESTful API 接口文档")
                        .contact(new Contact()
                                .name("开发团队")
                                .email("admin@example.com"))
                        .license(new License()
                                .name("MIT License")
                                .url("https://opensource.org/licenses/MIT")));
    }
}

